const req = require('./api.js');

const {
  apiUrl
} = getApp().globalData;


//深圳安宝通小程序
//-----------------------------------------------------------------------------------------
export const getMsg = (phone, device_uuid, code) => req(apiUrl + '/api/cpt/send_sms', {
  p: "t",
  phone,
  device_uuid: device_uuid,
  code: code
}, {
  method: "POST",
  loading: {
    show: false
  }
})
// 获取图形验证码
export const CptShow = (device_uuid, ) => req(apiUrl + '/api/cpt/show', {
  p: "t",
  device_uuid: device_uuid,
}, {
  loading: {
    show: false
  }
})
// 登录接口
export const UsersLogin = (phone, smscode) => req(apiUrl + '/api/users/login', {
  p: 't',
  phone,
  smscode,
}, {
  method: "POST",
  loading: {
    show: false
  }
})


//获取会展简介
export const getZ = () => req(apiUrl + '/api/home/about', {
  p: 't',
}, {
  method: "GET",
  loading: {
    show: false
  }
})

// 获取参观须知
export const getVisit = () => req(apiUrl + '/api/home/visit', {
  p: 't',
}, {
  method: "GET",
  loading: {
    show: false
  }
})
// 获取地图列表
export const getMap = () => req(apiUrl + '/api/map_list', {
  p: "t",
  language: 1,
  floor_id: 0
}, {
  method: "GET",
  loading: {
    show: false
  }
})
//获取地图上展厅的展品
export const getExhibit = (map_id) => req(apiUrl + '/api/map_exhibit', {
  p: "t",
  language: 1,
  map_id: map_id
})
export const BH_ExhibitDetail=(id,token,language=1) =>req(apiUrl + '/api/exhibit_info', {
  p: "t",
  language: language,
  exhibit_id: id,
  api_token:token
})
//获取预约记录
export const getList = (token,page,limit) =>req(apiUrl+'/api/home/myticket',{
  p:"t",
  api_token:token,
  page:page,
  limit:limit
})
//取消预约记录
export const cancelOrder = (token,id) =>req(apiUrl+'/api/home/deletes',{
  p:"t",
  api_token:token,
  id:id
})
// 获取报名记录
export const getOrder = (token,page,limit)=>req(apiUrl+'/api/home/myapply',{
  p:"t",
  api_token:token,
  page:page,
  limit:limit
})
// 获取报名记录详情
export const getTeamDetail = (token,id)=>req(apiUrl+'/api/home/info',{
  p:"t",
  api_token:token,
  id:id
})
// 获取报名记录详情
export const cancelTeamDetail = (token,id)=>req(apiUrl+'/api/home/cancel',{
  p:"t",
  api_token:token,
  id:id
})
// 获取热点
export const getHot = (token,id)=>req(apiUrl+'/api/map_hot',{
  p:"t",
})
//获取足迹
export const visit_exhibit=(token,exhibit_id)=>req(apiUrl+'/api/visit_exhibit',{
  p:"t",
  exhibit_id:exhibit_id,
  api_token:token
})